package com.pai4j.common.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum AiFunctionEnum {

    CHAT("对话"),

    IMAGE("文生图"),

    AUDIO("文生音频"),

    PLANTUML("文生UML"),

    VIDEO("文生视频");


    private String functionName;


    public static String getFunctionName(String function) {
        if (StringUtils.isBlank(function)) {
            return "未识别到意图";
        }
        for (AiFunctionEnum aiFunctionEnum : AiFunctionEnum.values()) {
            if (aiFunctionEnum.name().equals(function)) {
                return aiFunctionEnum.getFunctionName();
            }
        }
        return "未识别到意图";
    }
}
